fix firefox problem with dynamicaly loading scripts