Fixed selction and cursor position issues.
5.4.6