fixed message class casting exception when sending from Python producer