Fix definition of entity variable