fix number cast exception