Solve minor problems in test code