fixed cursor position bug, cursor position requires label width which is not calculated until later