fixed some sensors code