Fix problems in test