fix a bug with map clicking