bugfix in reference setter