fix case when element is removed while wait