fix early return
change imports for lib/pg