fix bug caused by commit 3d113bd.