Fixes in JS for display sidebars