fixed javascript being imported when not needed