[fix] added guard which prevents multiple close action