Fixed math a bit