[FEATURE] Used setImmediate to fix max call stack