trying to fix events for the debug panel. Not there yet.