I think you need to do `if (cb) cb()` here.