fixed problem with image loading