Fix postgres issue