Fixed Serial IO bugs