Fix bug where groups deactivate on save. #1226