fixed ecs script