saving images error fixed