Authorization check fixed