correction in js as well