Fixed issue with pg