fixed avgPrice bug