use proper parents for all gui windows/messages so that child gets killed automatically if the parent is closed
use proper parents for all gui windows/messages so that child gets killed automatically if the parent is closed