Fix JS gloval variable