Fix errors with not enough data