gras: fix compile register issue - use dynamic cast