Added check for wrong length targets.