Fixed cursor bug.
TODO updated.