fix up some tests and some code warnings