fix double loading and executing js