actually remove child windows
empty buffer stack fix
misc fixes and adjustments
Merge branch 'master' into gui