Fix some arithmetical errors

yes, you are.