bug fix with saving png format