Fixed (presumed) race condition on tool window cast (#82).