fix save image bug