fixed search and a bunch of stuff