fixed sensor.contact and hook