Avoid conflicts between similar bits of map javascript