Fix image save issues