Image saving now saves the correct image and only after it is loaded.