Fixed some positioning bugs

Fixed some cursor positioning bugs in the MLTextCtrl.