Fixed a bug that occurs when a pawn reaches last rank