fixed small computation error