Fixing attachment bug