Fix result.close when no attachment