Minor fix with error raised