Fix ->delete and add test