fix the postion of the cursor not sync and some detail