Fixing bad refactor