Fixed logic error in force_secure.