Fix doc generation error. (--test flag doesn't do the doc generation)