Bugfix for window positioning