more fixes for wait_serial