Fixed a bug for layer added to stage