Fixed equation broken after refactoring