ticket #4222 fixes