Fix authorization checks.