fixed character positions bug