Fix bug in create index command