Fix some errors in tests