Fixed missing parenthesis in javascript