invoke function in the if check
Merge pull request #214 from caranicas/fix/linearMotor

invoke function in the if check