Fix array access in explode