Fix for CRM-15564

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