bug fix for #3879