fixed bug caused by #2001