fix funcflag and its doc