fixed javascript load ordering