Major fix in panel.js