fix a bug of dealing with workflow runtime exceptions