removing circular dependency
fixing uncommitted transactions waiting