Fixed the splitter function