Ensure Cursor::limit() argument is casted to an integer