fixed user search bug in postgresql