Fixed restore of qtype options, and error in unit test.