Fixed postgres issue