serial code fix