Fix odd behavior when saving sort orders