Modified Gem to use pg