fix buggs delete add function