fixed broken state search