fix buy flag