Applied a patch from mrm.