fixed print-factor-table (and other minor issues)