fixes for CRM-13824

----------------------------------------
* CRM-13824: Fatal error on contribution page
  http://issues.civicrm.org/jira/browse/CRM-13824
Merge pull request #2082 from kurund/CRM-13824

fixes for CRM-13824