Fix the case when there are several inputs
Merge pull request #7 from majakabiljo/fix_input

Fix the case when there are several inputs