Looks like context manager messes up database connections.