Made some changed to image loading