fixed: bug when a layer has no child