Patchwork fix for bug #268.