Fixed a bug with Entities being run multiple times under certain conditions