Fix some test code