Phreeze fix for query test warnings and fortunes test fail

fixed warnings and failure of fortunes test per issue #782