fixed error in checkaccess