correct some more refactoring bugs