correcting scope issue for motion control