Fix Primative Maths functions

Fix Primitive Maths functions.

http://scratch.mit.edu/projects/21930483/ can be used to test