Hopefully fixed attachment handling completely