Fixed panic in test