Some fixes in movePiece()