Oops, remove resource leak in the input wrapper.