ticket 19659 two bug fixes