Fixed bug created when I refactored.