fix little javascript bug in example