fix some math