Fixed call to non-static method statically
Improved handling of nested exceptions