Implement test for missing input of source and fix bug.