fix a bug for one to one relation.