cursor related fixes