Fixed drawing issues before the images were loaded