fix for 1049589 and 1049591

better to do updateObjects outside for loop.