bugfix: search for relation only if contact and account have an id