fixed a minor bug with cursor