Fix duplication of javascript being called twice

Let's try again!