Added more casting to fix string number problems.