fix bugs js