fix bug where we tried to join an empty input.