Fixed negative quantity purchase bug