verified the work on CRM-12395

Manually merged https://github.com/civicrm/civicrm-core/pull/493