Disabling retract button when it is not visible so that button is not triggered accidently