In the resetState function the motors, LEDs and display are reset, but not the sensors.
E.g. the color sensor's lights are still on after using it.
I only tested it with the color sensor but it should be the case for all of them.
I do not know if this is a real issue or not.