setimmediate in loadshard to fix callstack exceeded bug