Small fixes in the debug toolbar panel.
Uses Lock instead of Event for thread-safety tests.