Bug fix for flatdoc js loading

Load all js synchronously