Yes, you need an input resistor so the input source doesn't short the hysteresis.
Also, the lousy old LM324 opamp is one of the slowest. Its max full output frequency is only 1kHz or 2kHz. At higher frequencies its output level reduces because its output becomes a slowly ramping triangle-wave.
i know but i need more than one switch levels from one sensor and i need to invert the analog signal also to drive a VSD so to do that i need at least 2 comparators and 1 opamp (not critical in specs) the 1 left over leave unused