Error fixes for last pull request

One error remaining: switching over a String is impossible!!