Fixed postgres search