corrected error handling in Expr