Improve updateTarget method