ticket #5502 fixes