fixed some ECS code