Fixed input handler middleware lazy instantiation.