Fixed input stream and input source duplication issue