Fixed checking permissions to unblock