Fixes bug caused by refactoring.