         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

    for i in [1..9]
      if reply.indexOf("<input#{i}>") > -1
        reply = reply.replace(new RegExp("<input#{i}>", "ig"),
          @master._users[user].__history__.input[i])
      if reply.indexOf("<reply#{i}>") > -1
        reply = reply.replace(new RegExp("<reply#{i}>", "ig"),
          @master._users[user].__history__.reply[i])

    # <id> and escape codes
    reply = reply.replace(/<id>/ig, user)

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

          # Then we process all tags (forJS)
          @say "Raw condition: #{condition}"
          condition = @processTags(user, msg, condition, stars, thatstars, step, scope, true)
          condition = @processCallTags(condition, scope, false)
          @say "Processed condition: #{condition}"

          try isMatch = eval(condition)
          catch e
            @say "Error while evaluating triggerCondition: #{e}"
            isMatch = false

          @say "Returned: #{isMatch}"
          if !isMatch
            stars = []
