Loading images with some bugs