fix issue when 0 purchases