fixes to attachment handling & dialog buttons