Minor bug fixes (closes open windows after tests)