Fix bugs on PythonEvents isolation from DbContext