fixed issues with postgres gem