Merge pull request #488 from Maaack/fix-overlaid-window