fixed entity system related errors