Fix MPE when exception occurs.