Fix attachment data retrieval.