Unparent button won't work now with layers and root entity

so it don't crash the app any more.