Resolved Issue #7 by cloning the input parameter