Fix bug: will now process one time for an input.(as shown in issue#1).