CRM-14917 upgrade fix

----------------------------------------
* CRM-14917:
  https://issues.civicrm.org/jira/browse/CRM-14917
Merge pull request #3394 from monishdeb/CRM-14197

CRM-14917 upgrade fix