Fix parsing of the layer.

Without theses fix the parsing of the layer fails.

Denis.