fix "delete" bug