Fix serial id bug