Added rebuilding of images