fixing buying bug