fix overlooked refactor bugs