fixes to test code