Apply Jim's patch