Fix bRet template functions