fix error for attaching multiple files