support for top level exceptions handling
small code fix