Fix cursor.py when max_id or since_id are None