make window closing work...