Fixed bug https://github.com/civicrm/civicrm-core/pull/1206#issuecomment-21285959