Fixed switching between accordion and tabs.

Resolves issue #167.