fixed model saved to local storage by assigning model id