Fix getSingleInput so that optimizations work