fix bugs exposed by quine