diff --git a/app/models/attachment.rb b/app/models/attachment.rb
index ff434d8..5bfec51 100644
--- a/app/models/attachment.rb
+++ b/app/models/attachment.rb
@@ -145,10 +145,9 @@ class Attachment < ActiveRecord::Base
       attachments.each_value do |attachment|
         file = attachment['file']
         next unless file && file.size > 0
-        a = Attachment.create(:container => obj,
-                              :file => file,
-                              :description => attachment['description'].to_s.strip,
-                              :author => User.current)
+        a = obj.attachments.create(:file => file,
+                                   :description => attachment['description'].to_s.strip,
+                                   :author => User.current)
 
         if a.new_record?
           obj.unsaved_attachments ||= []
diff --git a/app/models/issue.rb b/app/models/issue.rb
index 59c0ac6..75a3cc4 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -35,7 +35,7 @@ class Issue < ActiveRecord::Base
   has_many :relations_to, :class_name => 'IssueRelation', :foreign_key => 'issue_to_id', :dependent => :delete_all
 
   acts_as_nested_set :scope => 'root_id', :dependent => :destroy
-  acts_as_attachable :after_remove => :attachment_removed
+  acts_as_attachable :after_add => :attachment_added, :after_remove => :attachment_removed
   acts_as_customizable
   acts_as_watchable
   acts_as_searchable :columns => ['subject', "#{table_name}.description", "#{Journal.table_name}.notes"],
@@ -603,8 +603,6 @@ class Issue < ActiveRecord::Base
 
       if valid?
         attachments = Attachment.attach_files(self, params[:attachments])
-
-        attachments[:files].each {|a| @current_journal.details << JournalDetail.new(:property => 'attachment', :prop_key => a.id, :value => a.filename)}
         # TODO: Rename hook
         Redmine::Hook.call_hook(:controller_issues_edit_before_save, { :params => params, :issue => self, :time_entry => @time_entry, :journal => @current_journal})
         begin
@@ -834,7 +832,12 @@ class Issue < ActiveRecord::Base
     end
   end
 
-  # Callback on attachment deletion
+  def attachment_added(obj)
+    @current_journal.details << JournalDetail.new(:property => 'attachment',
+                                                  :prop_key => obj.id,
+                                                  :value => obj.filename)
+  end
+
   def attachment_removed(obj)
     journal = init_journal(User.current)
     journal.details << JournalDetail.new(:property => 'attachment',
diff --git a/app/models/mail_handler.rb b/app/models/mail_handler.rb
index 6357543..c75ba23 100644
--- a/app/models/mail_handler.rb
+++ b/app/models/mail_handler.rb
@@ -200,10 +200,9 @@ class MailHandler < ActionMailer::Base
   def add_attachments(obj)
     if email.has_attachments? || email.multipart?
       email.attachments.each do |attachment|
-        Attachment.create(:container => obj,
-                          :file => attachment,
-                          :author => user,
-                          :content_type => attachment.content_type)
+        obj.attachments.create(:file => attachment,
+                               :author => user,
+                               :content_type => attachment.content_type)
       end
     end
   end
