Fix canAccess check