bugfixes, changed db to postgres