Avoid blocking the UI thread when selecting target