replaced the creation of system table with code that uses the normal DBAgent instance.