Fixed sensor ClassCastExceptions