Fix the raise exception issue