fix a bug of js