reseting input_stream before second usage

fixes #8