Reverted some incorrect math "optimizations"