fixed javascript loading