Fixed editor not closing because it's state is 'closed' even though it is open for some reason