fixed issue in js