CLOUD-67 fixed instancetype problems