fixed cursor corruption problem in RAIL