Hide collapse button when the panel is collapsed
Fix bug in js