fixed bug with serial