Fixes for image save