fixing attachment sort order to close #144