revive a casting code in the binding
disable logging to avoid a exception ignored message