fix accordion and switcher issue

issue: accordion and switcher not working after a modal has been closed
once