fixed not cleaning up of window array