Fixed stupid refactoring mistakes