Fixed ecs and querygen