Minor changes in type casting.