fix for issue #CRM-14563

See https://issues.civicrm.org/jira/browse/CRM-14563
And see forum http://forum.civicrm.org/index.php?action=post;topic=32539.0;last_msg=138937