config['api'] is set but empty; properly handle this
Merge pull request #155 from balr0g/api-or-index-fix

Fix --index