Bug fix in attachment manager.