fixes #101, fixes #93 - Refactored some of the debug logging and cursor logic and it fixed these issues.