fixing bug 1043