Fixed handling of window border with crummy hack