removed sorting bug
improved multiple pdf and zip generation