Fixed issue, if PNG is not on last iteration.
Merge pull request #2 from lolzballs/master

Fixed issue, if PNG is not on last iteration.