Better pythonexception-compatibility and patch