fixed recursively defined gradient template type