Fixed ugly bug in Register & DatabaseHandler