Fix sequence error

Fixes issue #1