Fix pg handler