fix deletetion bugs.