Feature/issue 331

Fixes #331 (StringIndexOutOfBoundsException in SettingsActivity).