Fixed image download and saving state