dumb bug in type inference on function calls