Resolved the issue with the results being smaller than the input.