Fixed bugs in map deserialization. Now it is ready for implementation of map editor.