Fixed bug reading data and handling layer names