Fix when using attachment directly