Fixed compatibility issue with String.getBytes()