Changed close map functionality