Fix issue with postgres string vs int