fix bug on DBContext (ERROR: New transaction is not allowed because there are other threads running in the session.)