Fix snapshot search logic