Minor logic error in disabling auto-redirect