Amplifier + Comparator problem
What is the frequency of the signal from the first stage?

The LPV802 is an incredibly low power (320nA) but extremely slow opamp (8kHz).  It may not come out of saturation rapidly enough for use as a comparator.

Opamps are not generally intended for use as comparators and even normal speed amplifiers may take a long time (microseconds to milliseconds) to come out of saturation.

Do you need such low power?

If not try using a faster opamp, or using a low power comparator for the second stage.