fixed close window command