Fixed issue with sim.data and long strings

Also added a unit test for it.