changes+added security check in Entity::initFromBlueprint