Fix ES Type and Index handling