fixes #54 and some other map issues