Fix tab error.
Fix bug where cursor position was't being returned.