fixed thumbgen only generate last page