fix logic error for ec2 machines of state Unknown