Frodo patch from mswiege