fixed js error for map display