Record the local best instead of the next state.

- As a result, the performance imroved a little.