fix handling of NoPermissionException