Small bug fix in device controller.