ZCLOUD-186: improve detect