minor type in condition of if for creating res_name is fixed.