Improve instanceFromTarget