object syntax error fix for js compiler