Some changes to target handling.