YOMO-7159 add test + small fix
YOMO-7159 better condition