update the bug javaript