Fixed syntax

Moved setting of entity variable to fired clause.