Fix bug where "undefined" would be stored as a sequenceId