Fixed states dialog. Added "collapse_group" method to the API.