added auto-off on retract