fixed bug on viewpurchases