closed #3988: add bug test