Fixed a bug where if a castling move was undone, castling rights were unchanged, meaning that the player could not castle again