avoid nil positions
Merge branch 'sortable-attachments'