Fix the split bug. Some minor fixes.