Reworked some math after I noticed it was off