changed some window closing things