MDL-21891 fix for pg incompatibility - credit goes to Penny Leach