fix issue with seq_id when set to 0, patch courtesy of Benjamin Warren