Bugfixes to STL map