fix delete bugs