Fix declaration of return type variable in dfunc