Make functions template compatible