Fixed image save issues