Fixed a couple math fails.