fix map javascript