fixed NaN bug and list bug