Fixes the NaN all over the place