The problem was that new ID's that didnt have any naming collisions whould not run sort_alpha_id, which lead to most images not being sorted. Simple fix is to make sort_alpha_id run on all new ID's. but we need to make sure all data is kept sorted. maybe a check when running in debug mode would help.