Authirization bug fix