String IndexOutOfBounds Exception while using extensions in companion app

Galaxy S3 (Android 4.3):