Finally fix the usage of limit (#2240)