         for i in [1..9]
           if regexp.indexOf("<#{type}#{i}>") > -1
             regexp = regexp.replace(new RegExp("<#{type}#{i}>", "g"),
-              @master._users[user].__history__[type][i])
+              @formatMessage(@master._users[user].__history__[type][i-1]))
 
     # Recover escaped Unicode symbols.
     if @utf8 and regexp.indexOf("\\u") > -1

        # We check if there is a trigger condition
        if isMatch and trig[1].triggerCondition isnt null
          condition = trig[1].triggerCondition
          @say "Checking trigger condition #{condition}"

          # Then we process all tags (forJS)
          condition = @processTags(user, msg, condition, stars, thatstars, step, scope, true)
          condition = @processCallTags(condition, scope, false)
          @say "#{condition}"
          try isMatch = eval(condition)
          catch e
            @say "Error while evaluating triggerCondition: #{e}"
            isMatch = false
          @say "Returned: #{isMatch}"
          if !isMatch
            stars = []

            isMatch = true
        else
          # Non-atomic triggers always need the regexp.
          match = msg.match(new RegExp("^#{regexp}$"), "i")
          if match
            # The regexp matched!
            isMatch = true
