bugfixes for model .target() when there is no id.