Fixed attachment bug.