removed crash when closing