Fixed map JS bug