fixed issue with js load order