fixed typechecking errors in Sequence