fixed issue with taskbar quit button
close hidden window on quit
minor amendment
removed unused parameters