fixed bug with preserving transparent layer when creating new layers