Use the cursor provided in kargs, if one is provided.

Right now, if a cursor is provided, it is not taken into account, and an error is raised