fixed cursor update and offset