Merge in changes from Roger @ DbVis.