Fix some arithmetical errors

Please remove comparison.