Fix a bug with initial cursor