fix attaching of files