fix(app): cannot use threadsafe with deferred