fixed bugs added after refactoring