Reverted part of 9dc128c466717d4be20c1a7ca46e7b61cd40c88e to remove a circular dependency issue