implemented workaround to Java String bug