fix map javascript error