Some bug fixes to empty maps. Still pretty flakey though.