fixed a bug caused by previous commit