Bugfixes in the subset functions