fixes closing a