Fixe bug findCastsTo method

Signed-off-by: AndroWiiid <androwiiid@gmail.com>