Bug fixes

Fixed bug where adding a new layer would make the map's height equal
it's width.