Prevent an exception being thrown on second run.

Remove items from tables properly