Small fix to EC2 VM search handling

Small fix to EC2 VM search handling