Fixed complex dataset constructor