improved the build script for the doc document
fixed the tutorial build