Bug fixes

I think I have fixed the buying.