fixes for CRM-13824

----------------------------------------
* CRM-13824: Fatal error on contribution page
  http://issues.civicrm.org/jira/browse/CRM-13824