Fix double save issue attachments