finally fixed the f*ing pg gem