fixed two ecs bugs