Fixes window cursor functions

There were typos and other issues.