Fixed bugs in Math.
Fixed shader bugs.