Fixed byte_index bug in switchboard