added error handling for instance resolved throwing exception