ticket #4223 fixes