Fixing a bug with serach functionality.