diff --git a/templates/markdown/.partials/events.md b/templates/markdown/.partials/events.md
index 8a98a986c..99541ed7a 100644
--- a/templates/markdown/.partials/events.md
+++ b/templates/markdown/.partials/events.md
@@ -3,9 +3,9 @@
### Events a client can receive:
{{#each asyncapi.events.receive as |event index|}}
{{#if event.x-title}}
-#### {{event.x-title}} {{#if message.deprecated}} (**deprecated**){{/if}}
+#### {{event.x-title}} {{#if event.deprecated}} (**deprecated**){{/if}}
{{else}}
-#### Event #{{index}} {{#if message.deprecated}} (**deprecated**){{/if}}
+#### Event #{{index}} {{#if event.deprecated}} (**deprecated**){{/if}}
{{/if}}
{{> message message=event hideTitle=true}}
{{/each}}
@@ -13,9 +13,9 @@
### Events a client can send:
{{#each asyncapi.events.send as |event index|}}
{{#if event.x-title}}
-#### {{event.x-title}} {{#if message.deprecated}} (**deprecated**){{/if}}
+#### {{event.x-title}} {{#if event.deprecated}} (**deprecated**){{/if}}
{{else}}
-#### Event #{{index}} {{#if message.deprecated}} (**deprecated**){{/if}}
+#### Event #{{index}} {{#if event.deprecated}} (**deprecated**){{/if}}
{{/if}}
{{> message message=event hideTitle=true}}
{{/each}}