Fixed small bug made while refactoring.