fix error with entity