Fix proximity sensor

fixes freezing/hot reboot whenever proximity sensor is used