fixed minor broken refactoring