Permission check fixes