fixed a bug in seq sampling