fixed small refactoring errors