Fixed handling of unauthorized access.