Math.abs is not a function