Fix aggregate failing with a limit of 0