fixed: clear m_profiles later as SetCurrentProfileId uses it to set the profile. Replace another size() by empty().