SWITCHYARD-1383 - Fix for classcastexception