fix serial loop