Fixed a bug with entitytracker