fix a broken refactor