fix bug that duplicates entries as undefined

undefined entries are no longer added to the databases when the program is restarted after new students have been registered