fixed some js syntax errors