Small fix in javascript