Fixed math unit test code