fixed a bug on searching from database when there is no any person in person table