Fixed some bad check logic. Verified working on euca and openstack