Fixed handling of commands in index entries