Fixed some image saving problems.