Fixed the images not refreshing properly