fixed js error on img load error