make scond snippet more robust