type casting fix