Fixed a lot of Entity bugs