fixes bug in commit.cpp that only added input 0 to output