Fixed a bug with entity updates