added serial receive flush on loop