fix error happening when removing not appended node