fixed reader and output bugs in showgen.