BUGFIX MAX_ENTITIES was being overwritten