fixed fetchlimit function - renamed parameters