more postgre fixes