fixed bug regarding number of moves.