Fix for CRM-15615

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