Fixing bug 981