Fixes jQuery UI Accordion problems. Also fixes issue #251 (metadata modals).