bugfix: substring on utf8 gives half characters