7.x 13866 fix

Fix for issue - http://issues.civicrm.org/jira/browse/CRM-13866

I'm not sure if i've solved it the best way…