Fix problem with frozen nodes and refactoring