fix little bug in automodapi

fast merge to make RTD build.