fix small bug from refactoring