Casting function as introduced Fixes #8