Fixed bug in configureSensor