correctly check for the resourcebase_ptr
fix the layers_acls