Fix java.lang.StringIndexOutOfBoundsException from https://github.com/ks...

...freitas/gwt4nb/issues/15

Fix for https://github.com/ksfreitas/gwt4nb/issues/15