Some more bugfixing regarding deletion.