Fix javascript example