Delete a node before storing it

Forgot to include this, the tests work now