Fixed mix up between char pos and char positions, switched variable placement around