fix Exception(on castling)