add casting fix