Refixed faulty refactor