fixed image not loaded and attempt to redraw bug