merge an O3A patch from Paolo T.