fix logic error, test on bigdog