fix string size > buffer size