Fix error in test environment