Fixed a bug with the move ordering.