More test edge case fixing