fix JavaScript syntax