Added laststates to fancyname and to search form