corrected cursor positioning when position is 0 (start of the line)