Fixed a bug in SwitchInputStream