Corrections to adding and deletion functions