Pricing Barrier Options and Defaultable Bonds