fixed lock bug and  yaml serializing; sort actions by id when restoring from save