fixed local/server delete bugs