Fix some issues in serial, use a task instead of a timer