Fixed a bug in the layer type parsing