Fixes of bugs with sequence