fix: after sorting pictures, the ids are reset to an incremental order