CRM-13234 fix test failure + enhancements on profile api