Fixed issue with input-prepend

(cherry picked from commit 014b060)