Now red light does not turn off completly. Optimized