Fix for CRM-15544

https://issues.civicrm.org/jira/browse/CRM-15544