Fixed bug with contextwindow in low resolutions