Fix for bug 1450 high memory consumption