fixed bug for inTargetCell in oneStepFunc