Save and load lock ids when enabling and disabling