fix promises.dispatch.singledispatch implementation