switch to pg / bugfixes