fix small bug caused by previous refactoring