Fixes error in tools-panel.js