Fix wrong sql limit argument