fix erroneous refactor