solved nix restart issue: all entities are reset upon close()