Fix some arithmetical errors

yep