Fixed unneccessery serial port reopening