Minor fix to the cursor's __len__