fixed issue with empty history for buying