Fixed a number of purchasing bugs