Fixed problems with sensor control