bug fixes in postgres module, testing bug fixes