Fixed js syntax errors