Fail-safe motion control