Fixed bugs in mass update