fixed exception handling in single worker mode