fixed bug in the 2 class categorical splitting function