--bug in saving image