Added cast to MaterializeFrame to work aroun

Signed-off-by: Stefan Marr <git@stefan-marr.de>