type cast fix