Bug FIxes

map related bug fixes