fix a bug that inappropriately stores detail attributes on the wrong entity