Revised some number casting.