fixed bug in serialwriter not getting started at correct moment