AI-406 : bugfixing - avoid classcastexception