fix closing