Make collapse and expand for panel smoother