fix some test code