Fix bugs in sensor updates