Fix replace attachment