Fixing PG::Connection errors