Fixed failure to deal with strings

Fixed failure to deal with strings and renamed ```dict``` to
```dictionary```