fixed bug in deleting members