fixes record creation when the lookup field and pk have the same type