Fixing bugs in test code.