Fix bugs in search module and localization