fixed anoter bug in js