Corrected javascript syntax error