fixed buying bug