Bug fix for flatdoc js loading

Load js synchronously