Fix example with promise wrapper.