Corrected small bugs in BasicMath