Fixed a bug in the fourth move function