Fixed crash with removing entity layer before destroying components