Fixed circular db references