Bug fix and test basic deletion