fixed: order lost on edit in some rare cases