fix problem with upload attachment