Apply lock setting when the option is changed