Closure type checking fix