Remove incorrect cast variable in example function