Fixing bug where the DBRef was not getting saved for eventRegistry. Moved it to a proper data-type