fixes bug in js file