bug fixes. includes serial_comm and serial thread code