Fix type inference for proc expressions