Fixed states losing selected status when other states are clicked. Fixes some styling issues.