fixed ams bug with pg