Fix#1044

fixed #1044 when merged