 	then: (onFulfilled, onRejected) ->
 		self = @
 
-		new Promise (resolve, reject) ->
+		newPromise = @_thenOffset + 4
+
+		@_handlers[newPromise] = new Promise (resolve, reject) ->
 			addHandler self, onFulfilled, onRejected, resolve, reject
 
 	###*

		self._value = value

		offset = 0
		len = self._thenCount * 4

		while offset < len
			chainHandler self, offset

			offset += 4

		return


	# This is one of the most tricky part.
	#
	# For better performance, both memory and speed, the array is like below,
	# every 5 entities are paired together as a group:
	# ```
	#   0            1           2        3       4       ...
	# [ onFulfilled, onRejected, resolve, reject, promise ... ]
	# ```
	# To save memory the position of 0 and 1 may be replaced with their returned values,
	# then these values will be passed to 2 and 3.
	_handlers: []
	$groupNum = 5

	# It only counts when the current promise is on pending state.
	_thenOffset: 0

	$resolveSelf = 'circular promise resolution chain'

	nextTick = do ->
		if process? and process.nextTick
