Fix for issue 'Unpredictable behavior when adding cells'