Ben Laurie's fixes.