fixed serial code.