fixed isAuthorized