Fix proximity sensor

fixes freezing/hot reboot whenever proximity sensor is used

Signed-off-by: Nathan Chan <e334cn@gmail.com>