Fix typechecking with bindings