bugfix to map loading