Fixed the bug which can make the program crash  when reg can't find any valid title