fixed crash on sum change