CLOUD-252 fix cast