Fixed an error when closing editor tab that is still being styled.