Fixed bug when trying to get acc_name but object name is None.