Fixes accordian function