Fixing escaping issue with caused weird cursor overwrite behavior