Debugging javascript update