Fix sql error searching members

Fix sql error searching members