Fixed faulty variable in js file