Bug fix for case where search string is nil