fixed a bug that caused a string to be readed wrongly (null byte was ignored)