Reverted some code, there seems to be a problem with attachments