Fixed error from refactoring