repair cursor bug