Fixed a context issue with tool panels