Fixed a small bug caused during refactoring.