Added type casting.