Fixing errors in search by name, remove debug print statement