Fixes problems with upstream changes
Fixed conflicts
Merge pull request #183 from mannol1/master

Fixes problems with upstream changes
delete subwindows before parent window on resize to prevent memory leaks