fixed a bug in computeValue