Fixed sensor reading crashes.