fix for BZ 1079894 and 1080024