Bugfixes and tests for vector space segmentation