fix calcuting price and percent errors