Fix a little bug with cursor