Fixing assertion errors.

Fixing https://github.com/aborg0/rapidminer/issues/2