search fix for cast-as