fix attachment problems