small issue with cursor offset