fix javascript update