use cloud.has_instance to cleanup some code

use cloud.has_instance to cleanup some code