Removed pass-by-reference. I think this might break attachment_common.