exceptions fix for samples