Caught edge case and fixed tests