Fixed node removal. Closes #1238.