fix javascript syntax problem