applied patch prepared by Wayne Schroeder