Fix error with attachment codec