corrected js syntax error