General sensor bugfixes