fixed bug in saveas