Bugfix: Seq.take throws an exception when the input sequence is not long enough, using Seq.truncate instead.